<?php
namespace app\common\model\Member;
use app\common\model\Base;
use think\facade\Config;

class VideoVerify extends Base
{
    protected $name = 'member_video_verify';

    public function getVideoVerify($condition = [], $field = '*', $order = 'vv.id asc', $page = -1)
    {
        if ($page == -1){
            $page = Config::get('paginate.list_rows');
        }

        $res = $this->alias('vv')->where($condition)
            ->join('member m', 'vv.member_id = m.id', 'left')
            ->field($field)
            ->order($order);
        if ($page == 0) {
            return $res->select()->toArray();
        }
        $res = $res->paginate($page, false, ['query' => request()->param()]);
        $this->page_info = $res;
        return $res->items();
    }
}